/********************************************************************************
 * Project Name		[JavaSE_Fundamentals]
 * File Name     	[TestCharacter.java]
 * Creation Date 	[2015-01-01]
 * 
 * Copyright© ge.y.yang@gmail.com All Rights Reserved
 * 
 * Work hard, play harder, think big and keep fit
 ********************************************************************************/
package api.lang;

/**
 * java.lang.Character测试
 * 
 * @author 不落的太阳(Sean Yang aka ShortPeace)
 * @version 1.0
 * @since jdk 1.8
 * 
 */
public class TestCharacter {

	/**
	 * 测试Character类的常用方法
	 */
	public static void testCharacterMethods() {
		// 判断是否为数字字符
		System.out.println("a is a digit number? " + Character.isDigit('a'));
		// 判断是否为字母字母
		System.out.println("a is a digit alphabet? " + Character.isAlphabetic('a'));
		// 判断字符是否为合法的Java标识符组成部分
		System.out.println("a is a java identifer part? " + Character.isJavaIdentifierPart('a'));
		// 判断字符是否为合法的Java标识符的第一个字符
		System.out.println("a is a java identifer start? " + Character.isJavaIdentifierStart('$'));
		// 判断是否为小写字符
		System.out.println("a is lower case? " + Character.isLowerCase('a'));
		// 判断是否为大写字符
		System.out.println("a is upper case? " + Character.isUpperCase('a'));
	}

	public static void main(String[] args) {
		testCharacterMethods();
	}
}
